//
//  AgreementViewController.m
//  Courses
//
//  Created by YiXuePxh on 15/5/12.
//  Copyright (c) 2015年 boyibang. All rights reserved.
//

#import "AgreementViewController.h"
#import "WTFRect.h"
@interface AgreementViewController ()

@end

@implementation AgreementViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CGSize screenSize = [UIScreen mainScreen].bounds.size;
    UIWebView* webview = [[UIWebView alloc] initWithFrame:AutoRectMake(0, 0, screenSize.width, screenSize.height, WTFAutoLayoutTypeBar)];
    [self.view addSubview:webview];
    NSString* filePath = [[NSBundle mainBundle]pathForResource:@"agreement" ofType:@"html"];
    NSLog(@"filePath:%@",filePath);
    NSString* htmlString = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
    [webview loadHTMLString:htmlString baseURL:[NSURL URLWithString:filePath]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
